package com.jusnow.offer;

import com.sun.xml.internal.ws.addressing.WsaActionUtil;

import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author justnow
 * Created on 2020-09-03
 * Description
 */
public class StreamDemo2 {
    public static void main(String[] args) {
        String[] test2 = {"java", "react", "angular", "vue"};
        List<String> collect = Stream.of(test2).map(str -> str.toUpperCase() + " ").collect(Collectors.toList());
        System.out.println(collect);
        System.out.println();
        Arrays.stream(test2).filter(str -> str.contains("u")).map(str2 -> str2.toUpperCase() + " ").forEach(System.out::print);
    }
}
